{% if voyages %}
<table>
    <thead>
    <tr>
        <th>起运港/目的港</th>
{#        <th>航线</th>#}
        <th>承运人</th>
        <th scope="col">20GP</th>
        <th scope="col">40GP</th>
        <th scope="col">40HQ</th>
        <th scope="col">45HQ</th>
        <th>中转港</th>
        <th scope="col">附加费</th>
        <th scope="col">码头/船期</th>
        <th scope="col">航程</th>
        <th scope="col">备注</th>
        <th scope="col">有效期</th>
        <th scope="col">订舱</th>
    </tr>
    </thead>
    <tbody>
    {% for voyage in voyages %}
        <tr>
            <td>
                <a href="{{ url_for('voyage',voyageid=voyage.VoyageID) }}" class="lulport" title="{{ voyage.LoadPortName }}|{{ voyage.UnloadPortName+'('+(voyage.CountryName or '')+')' }}">
{#                {% if voyage.LoadPortNameEn!="NINGBO" %}#}
                    {{ voyage.LoadPortNameEn }}<br>
{#                {% endif %}#}
                {{ voyage.UnloadPortNameEn }}
                </a>
            </td>
{#            <td>{{ voyage.LineName }}</td>#}
            <td title="{{ voyage.ShipCompanyName }}">{{ voyage.ShipCompanyNameEn }}</td>
{#            {% if session.MemberID or session.MemberID==0 %}#}
            <td scope="col">{{ voyage.M20GP|int(default='*') }}</td>
            <td scope="col">{{ voyage.M40GP|int(default='*') }}</td>
            <td scope="col">{{ voyage.M40HQ|int(default='*') }}</td>
            <td scope="col">{{ voyage.M45HQ|int(default='*') }}</td>
{#            {% else %}#}
{#            <td scope="col">{{ voyage.P20GP|int(default='*') }}</td>#}
{#            <td scope="col">{{ voyage.P40GP|int(default='*') }}</td>#}
{#            <td scope="col">{{ voyage.P40HQ|int(default='*') }}</td>#}
{#            <td scope="col">{{ voyage.P45HQ|int(default='*') }}</td>#}
{#            {% endif %}#}
            <td title="{% if voyage.TransitPortNameEn!='直达' %}{{ voyage.TransitPortNameEn }}({{ voyage.TransitPortName }}){% endif %}">{{ voyage.TransitPort5Code or '直达' }}</td>
            <td scope="col"><a class="fee" href="{{ voyage.VoyageID }}" rel="{{ url_for('fee',voyageid=voyage.VoyageID) }}">附加费</a></td>
            <td scope="col">{{ voyage.PierName }}|{% if voyage.CutOff and voyage.Sail %}{{ voyage.CutOff }}/{{ voyage.Sail }}{% endif %}</td>
            <td scope="col">{{ voyage.SeaRange }}</td>
            <td scope="col">
            {% if voyage.Remarks or voyage.BatchRemarks %}
                <a class="remarks" href="#" title="{{ voyage.BatchRemarks|replace('\n','|')+'|<font color=red>'+voyage.Remarks|replace('\n','</font>|<font color=red>') }}</font>">备注</a>
            {% endif %}
            </td>
{#            <td scope="col">{{ voyage.VaildStart[5:] }}|{{ voyage.VaildEnd[5:] }}</td>#}
            <td scope="col">{{ voyage.VaildStart }}<br />{{ voyage.VaildEnd }}</td>
            <td scope="col" title="{{ voyage.BookingInfo or '' }}">{{ voyage.BookingShort|default('') }}</td>
        </tr>
    {% endfor %}
    </tbody>
</table>
<div>
                <span id="pagebar">
                    查询到 {{ rows }} 条记录
                    {% if page|int >1 %}
                    <a href="#" id="1">首页</a> <a href="#" id="{{ page|int-1 }}">上一页</a>
                    {% endif %}
                    {% if not (page|int>=pages or pages|int==0) %}
                    <a href="#" id="{{ page|int+1 }}">下一页</a> <a href="#" id="{{ pages }}">尾页</a>
                    {% endif %}
                    第 {{ page }} 页 / 共 {{ pages }} 页
                    转到 <input id="page_val" type="text" size="2" value="{{ page }}" />
                    <input id="page_go" type="button" value="Go" />

                </span>
</div>
{% else %}
<h4 class="box error">如未显示结果，请尝试修改有效期</h4>
{% endif %}

